package com.collection;

/**
 * @author south wind
 * @version 1.0
 * @date 2025/4/2 19:29
 * @description
 */
public class Worker {
    private String name;
    private int age;
    private double salary;

    public Worker(String name, int age, double salary) {
        this.name = name;
        this.age = age;
        this.salary = salary;
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public double getSalary() {
        return salary;
    }
    //工作work
    public void work(){
        System.out.println(name+"工作");
    }

    @Override
    public String toString() {
        return "姓名："+name+"年龄："+age+"工资："+salary;
    }
}
